package math;

import java.util.Stack;

public class Function {
	
	String function;
	Evaluator evaluator;

	public Function(String f){
		function = f;
		evaluator = new Evaluator();
	}
	
	public double evaluate(double x){
		return evaluator.evaluate(function, x);
	}
	
	public static void main(String [] arg){
		Function f = new Function("2.5+3");
		System.out.print(f.evaluate(1));
	}
}
